<template>
    <div class="apps">
        <transition enter-active-class="anim fadeInLeft" leave-active-class="anim fadeOutRight">
            <div class="page app-list">
                <Card :icons="apps" @icon-click="handleClick">
                    <template slot="title_top">
                        <div class="am-cf">
                            <div class="am-fl">ERP系统</div>
                            <a @click="back" class="am-fr"><i class="icon icon-return"></i> 返回</a>
                        </div>
                    </template>
                </Card>
            </div>
        </transition>
    </div>
</template>
<script>
export default {
    data() {
        return {
            apps: [
                {icon: 'product-hunt', title: '产品管理', color: '#a7bf34', url: '/erp/product', clickable:true, cls: 'owned'},
                {icon: 'user', title: '客户管理', color: '#f1894a', url: '/erp/client', clickable:true, cls: 'owned'},
                {icon: 'cart-plus', title: '进货管理', color: '#74e3cf', url: '/erp/purchase', clickable:true, cls: 'owned'},
                {icon: 'cubes', title: '库存管理', color: '#9587F1', url: '/erp/stock', clickable:true, cls: 'owned'},
                {icon: 'truck', title: '供货商', color: '#83D587', url: '/erp/vender', clickable:true, cls: 'owned'},
                {icon: 'wpforms', title: '订单管理', color: '#f56262', url: '/erp/order', clickable:true, cls: 'owned'}
            ]
        };
    },
    methods: {
        handleClick(item) {
            this.$router.push({path:item.url, display: item.title});
        }
    }
};
</script>
